<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    .box{
        height: 200px;
        width:200px;
        background: saddlebrown;
    }
    .box1
    {
        height: 100px;
        width:100px;
        background: lawngreen;
    }
    </style>
</head>
<body>
    <div class="box">
        <div class="box1"></div>
    </div>
    <script>
        var Box=document.querySelector(".box");
        Box.onclick=function(){
            Box.style.background="red";
            
        }
    </script>
</body>
</html>